require('./customers.model')
const mongoose = require('mongoose');
var Schema = mongoose.Schema;

var orderSchema=new Schema({
    address:String,
    realName:String,
    phone:String,
    createTime:Date,
    status:Number,
    totalPrice:Number,
    orderItem:[{
        num:Number,
        dishName:String,
        unitPrice:Number
    }],
    customer:{type:Schema.Types.ObjectId,ref:'Customer'},
    merchant:{type:String,ref:'Merchant'}
    // ,
    // comment:{type:Schema.Types.ObjectId,ref:'Comment'}
});

mongoose.model('Order',orderSchema);